package com.yugao.fintech.libra.model.vo.user;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yugao.fintech.framework.desensitization.annotations.FieldSensitive;
import com.yugao.fintech.framework.desensitization.fieldsensitive.enums.StrategyType;
import com.yugao.fintech.libra.common.enums.SexEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;


@Getter
@Setter
@Accessors(chain = true)
public class UserBase implements Serializable {
    @Schema(description = "当前部门")
    private Long currentDeptId;

    @Schema(description = "工号")
    private String workNumber;

    @Schema(description = "用户真实姓名")
    private String realName;

    @Schema(description = "用户昵称")
    private String nickName;

    @Schema(description = "用户邮箱")
    @FieldSensitive(StrategyType.EMAIL)
    private String email;

    @Schema(description = "手机号码")
    @FieldSensitive(StrategyType.MOBILE_PHONE)
    private String phone;
    @Schema(description = "用户性别, 1=男,0=女,-1=未知")
    private String sex;
    private String sexText;

    @Schema(description = "用户头像")
    private String avatar;

    /** 用户生日 */
    @Schema(description = "用户生日")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date birthday;

    public UserBase() {
        this.sex = SexEnum.UNKNOWN.getCode();
    }
}
